<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>CSS Cookbook: center an element</title>
    <style>
        .list-group {
            border: 1px solid gray;
            border-radius: 6px;
            list-style: none;
            display: block;
            padding: 0;
            width: 300px;
        }

        .list-group li {
            padding: 6px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-top: 1px solid gray;
        }

        .list-group li:first-child {
            border-top: none;
        }

        .badge {
            background-color: brown;
            color: #fff;
            font-size: .8em;
            border-radius: 50%;
            width: 1.6em;
            height: 1.6em;
            text-align: center;
            line-height: 1.6em;
        }
    </style>
    <script>
    </script>
</head>

<body>
    <ul class="list-group">
        <li>Item One
            <span class="badge">2</span>
        </li>
        <li>Item Two
            <span class="badge">10</span>
        </li>
        <li>Item Three
            <span class="badge">9</span>
        </li>
        <li>Item Four
            <span class="badge">0</span>
        </li>
    </ul>
</body>

</html>